package com.aimao.blog.constant;

/**
 * @Author PuaChen
 * @Create 2018-07-02 15:01
 */
public class TableConst {
    public interface ArticleConst {
        /**
         * 草稿
         */
        Integer DRAFT = 0;
        /**
         * 正常
         */
        Integer NORMAL = 1;
    }

    public interface CommentConst {
        /**
         * 管理员身份
         */
        Boolean ADMIN = true;
        /**
         * 普通用户身份
         */
        Boolean USER = false;

        /**
         * 判读是否是回复还是正常的评论
         */
        enum ParentState{
            REPLY(1,"评论回复"),
            COMMENT(-100,"评论");

            Integer code;
            String msg;

            ParentState(Integer code, String msg) {
                this.code = code;
                this.msg = msg;
            }

            public Integer getCode() {
                return code;
            }

            public String getMsg() {
                return msg;
            }
        }
    }

}
